/**
 * (C) Copyright 2020 Ymatou (http://www.ymatou.com/).
 *
 * All rights reserved.
 */
package com.ymttest.database.sqlwapper;

import java.util.Date;

import com.ymatou.iapi.productquery.parameter.SecKill.SecKillProductActivityStockBean;
import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtSecKillStockConfig;

public class YmtSecKillStockConfigWapper {

	SqlManager manage;

	public YmtSecKillStockConfigWapper() {
		manage = new SqlManager("intpro");
	}


	
	/***
	 * 根据订单状态查询最新一笔订单
	 * @return
	 * @throws InterruptedException
	 */
	public int insertSecKillStockConfig(YmtSecKillStockConfig bean) {
		int insert = manage.insert("com.ymttest.database.mapping.YmtSecKillStockConfigMapper.insertSelective", bean);
		manage.commit();
		return insert;
	}
	
	

	/**
	 * 关闭数据库连接
	 */
	public void close() {
		manage.close();
	}

	
	
	@Override
	protected void finalize() throws Throwable {
		this.close();
		manage = null;
		super.finalize();
	}

	public static void main(String args[]) throws InterruptedException {
		YmtSecKillStockConfig b=new YmtSecKillStockConfig();
		b.setAction(true);
		b.setActivityId(123);
		b.setProductId("p123");
		b.setSecKillStockConfigId(111223);
		b.setUserId(12345);
		System.out.println(new YmtSecKillStockConfigWapper().insertSecKillStockConfig(b));
	}

}
